#ifndef CNRT_H
#define CNRT_H

typedef enum {
    cnrtSuccess = 0,
    cnrtErrorNotReady = 1,
    cnrtErrorInit = 100002,
    cnrtErrorNoDevice = 100004,
    cnrtErrorDeviceInvalid = 100005,
    cnrtErrorArgsInvalid = 100006,
    cnrtErrorSys = 100007,
    cnrtErrorSysNoMem = 100010,
    cnrtErrorInvalidResourceHandle = 100014,
    cnrtErrorIllegalState = 100015,
    cnrtErrorNotSupport = 100050,
    cnrtErrorOpsNotPermitted = 100051,
    cnrtErrorQueue = 100060,
    cnrtErrorNoMem = 100100,
    cnrtErrorNoKernel = 101312,
    cnrtErrorNoModule = 101315,
    cnrtErrorQueueCaptureUnsupported = 100360,
    cnrtErrorQueueCaptureInvalidated = 100361,
    cnrtErrorQueueCaptureWrongThread = 100362,
    cnrtErrorTaskTopoEntityUpdateFailure = 100400,
    cnrtErrorSetOnActiveProcess = 632002,
    cnrtErrorDevice = 632006,
    cnrtErrorNoAttribute = 632009,
    cnrtErrorMemcpyDirectionInvalid = 632013,
    cnrtErrorBusy = 632014,
    cnrtErrorCndrvFuncCall = 632015,
    cnrtErrorCndevFuncCall = 632017,
    cnrtErrorNoCnrtContext = 632019,
    cnrtErrorCndrvFuncNotFound = 632020,
    cnrtErrorUnknown = 999991,
    cnrtErrorMax,
} cnrtRet_t;


extern "C"
{
    cnrtRet_t cnrtGetDeviceCount(unsigned int *pCount);
    cnrtRet_t cnrtInit(unsigned int flags);
    void cnrtDestroy(void);

    // cnrtRet_t cnrtGetLibVersion(int *major, int *minor, int *patch);
    const char *cnrtGetErrorName(cnrtRet_t error);
}

#endif // CNRT_H